package org.argus.job.common.enums;

import com.google.common.collect.Lists;

import java.util.Collections;
import java.util.List;

/**
 * 时间表达式类型
 * @Author 刘文/Cliff Liu
 * @Date 2024/8/4
 */
public enum TimeExpressionType {
    CRON,
    API,
    FIXED_RATE,
    FIXED_DELAY,
    WORKFLOW,
    DAILY_TIME_INTERVAL;


    public static final List<TimeExpressionType> FREQUENT_TYPES = Collections.unmodifiableList(Lists.newArrayList(FIXED_RATE, FIXED_DELAY));
    /**
     * 首次计算触发时间时必须计算出一个有效值
     */
    public static final List<TimeExpressionType> INSPECT_TYPES =  Collections.unmodifiableList(Lists.newArrayList(CRON, DAILY_TIME_INTERVAL));
}
